<template>
    <div>
        {{num}}
        <button @click="add">add</button>
    </div>
</template>
<script>
export default {
    props:['num'],
    methods:{
        add(){
            let num = this.num + 1;
            this.$emit('add',num);
        }
    }
}
</script>
